exports.CreateCashTask=function(_args)
{
	var pathimage=Ti.App.Properties.getString('pathimage');
	var view = Ti.UI.createView({
		width:_args.width,
		height:_args.height,
		backgroundColor:'Transparent',
		top:0,
		right:_args.right,
		
	})
	
	
	var platformWidth=Titanium.Platform.displayCaps.platformWidth;//Ti.App.Properties.getInt('platformWidth');
	var platformHeight=Titanium.Platform.displayCaps.platformHeight;//Ti.App.Properties.getInt('platformHeight');
	
	//////////////////Task//////////

	var bt_height=Ti.App.Properties.getInt('Order_buttonnumber_height')
	var space=20
	var height_bt=(platformHeight-6*space)/5;
	var width_bt=_args.width;
	var top_bt=20;
	var top_row2=bt_height;
	var top_row3=2*bt_height;

	
	var bts=[
		{title:'Trả tiền',value:1,func:'',backgroundImage:pathimage+'tb2.png',backgroundSelectedImage:pathimage+'bt_Nau_press.png'},
		{title:'Thẻ tín dụng',value:2,func:'',backgroundImage:pathimage+'tb2.png',backgroundSelectedImage:pathimage+'bt_Nau_press.png'},
		{title:'Thẻ ưu đãi',value:3,func:'',backgroundImage:pathimage+'tb2.png',backgroundSelectedImage:pathimage+'bt_Nau_press.png'},
		{title:'Acount Blance',value:4,func:'',backgroundImage:pathimage+'tb2.png',backgroundSelectedImage:pathimage+'bt_Nau_press.png'},
		{title:'Đóng',value:5,func:'back_Cash',backgroundImage:pathimage+'bt_red.png',backgroundSelectedImage:pathimage+'bt_red_press.png'},
	]
	var createButton = function (bt) {
		var bt_bbt = Titanium.UI.createButton({
			 backgroundColor:'##c0c0c0',
		     borderColor: Ti.App.Properties.getString('borderColor'),
		     borderRadius: Ti.App.Properties.getInt('borderRadius'),
		     borderWidth:Ti.App.Properties.getInt('borderWidth'),
			 color:'Black',
			 backgroundImage:bt.backgroundImage,
			 backgroundSelectedImage:bt.backgroundSelectedImage,
			 title:bt.title,
			 func:bt.func,
			 value:bt.value,
			 width:width_bt-5,
		 	 height:height_bt,
		   	 top:top_bt,
		   	 right:5,
		   	 font:{
				fontSize:20,
				fontWeight:'bold',
			 },
		}); 
		bt_bbt.addEventListener('click', function (e) {
			if(e.source.value==5)
			{
				Ti.App.fireEvent(e.source.func);
			}
			
        })
		return bt_bbt;
	}
	for (i = 0; i < bts.length; i++){
        var btadd=createButton(bts[i])
		view.add(btadd);
		top_bt+=btadd.height+space;
    }
	
	return view;
}
